﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="DMS.Web.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>请登录</title>
    <link type="text/css" rel="stylesheet" href="Themes/Default/style.css" />
    <script language="javascript" type="text/javascript" src="Resources/Scripts/Scripts.js"></script>
    <base target="_self">
    </base>
</head>
<body id="login" scroll="no">
    <form id="form1" runat="server" defaultbutton="lbtnLogin">
    <div id="container">
        <div id="header">
        </div>
        <div id="content">
            <table class="MTable" cellpadding="0" cellspacing="0">
                <tr>
                    <th>
                        用户编号(<u>U</u>)：
                    </th>
                    <td>
                        <asp:TextBox ID="txtUserName" runat="server" AccessKey="u" Text=""></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;<asp:RequiredFieldValidator ID="rfvUserName" runat="server" ControlToValidate="txtUserName"
                            Display="Static" Text="*"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <th>
                        密&nbsp;&nbsp;&nbsp;&nbsp;码(<u>P</u>)：
                    </th>
                    <td>
                        <asp:TextBox ID="txtUserPWD" runat="server" TextMode="Password" AccessKey="p"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;<asp:RequiredFieldValidator ID="rfvUserPWD" runat="server" ControlToValidate="txtUserPWD"
                            Display="Static" Text="*"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="randomImageTr" runat="server">
                    <th valign="top"  style="padding-top:7px;">
                        验&nbsp;证&nbsp;码(<u>C</u>)：
                    </th>
                    <td>
                        <table cellpadding="0" cellspacing="1">
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtLoginCode" runat="server" Width="50px" ToolTip="不区分大小写" MaxLength="5" AccessKey="c"></asp:TextBox>&nbsp;&nbsp;&nbsp;
                                </td>
                                <td>
                                    <img id="imgLoginCode" src="/Common/Services/GetRandomImage.aspx" />
                                </td>
                            </tr>
                        </table>
                        <div style="width:100%; text-align:right;">
                        <a href="javascript:ChangeImage();">看不清？换一张</a>
                        </div>
                    </td>
                    <td>
                        &nbsp;<asp:RequiredFieldValidator ID="rfvLoginCode" runat="server" ControlToValidate="txtLoginCode"
                            Display="Static" Text="*"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="trLoginMode" style="display: none">
                    <th>
                        登录模式(<u>M</u>)：
                    </th>
                    <td>
                        <asp:DropDownList ID="ddlLoginMode" runat="server" AccessKey="m">
                            <asp:ListItem Value="0" Selected="True">静态密码</asp:ListItem>
                            <asp:ListItem Value="1">短信密码</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tfoot>
                    <tr>
                        <th>
                            &nbsp;
                        </th>
                        <td>
                            <asp:LinkButton ID="lbtnLogin" runat="server" AccessKey="O" CausesValidation="true"
                                OnClick="lbtnLogin_Click"><img alt="登录(O)" title="登录(O)" src="Themes/Default/btn_login.gif" /></asp:LinkButton>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <asp:Label ID="lblErrorMsg" runat="server" Visible="false"></asp:Label>
                        </td>
                    </tr>
                </tfoot>
            </table>
        </div>
        <div id="footer">
            <p>
                Copyright @ 2010 中国移动广东公司广州分公司 All Right Reserved
            </p>
        </div>
    </div>
    <script language="javascript" type="text/javascript">
    <!--
        function ddlUserType_onchange(obj) {
            var loginModeRow = document.getElementById("trLoginMode");
            if (obj.value == "Supplier" 
                && "<%=AllowSMSPwd.ToString().ToLower() %>" == "true") {
                loginModeRow.style.display = "block";
            }
            else {
                loginModeRow.style.display = "none";
            }
        }

        function ChangeImage() {
            var o = document.getElementById("imgLoginCode");
            o.src = "/Common/Services/GetRandomImage.aspx?r=" + +Math.random();
        }
    //-->
    </script>
    </form>
</body>
</html>
